﻿using Dataforge.PrismAvalonExtensions;
using Dataforge.PrismAvalonExtensions.Regions;
using Microsoft.Practices.Prism.Regions;
using Microsoft.Practices.ServiceLocation;
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Xceed.Wpf.AvalonDock;
using Xceed.Wpf.AvalonDock.Layout.Serialization;

namespace AvalondockTest
{
  /// <summary>
  /// Interaction logic for MainWindow.xaml
  /// </summary>
  [Export(typeof(MainWindow))]
  public partial class MainWindow : Window
  {
    public MainWindow()
    {
      InitializeComponent();
    }

    [Import]
    IRegionManager _regionManager;

    protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
    {
      SerializationHelper.Serialize(DockingManager, "Layout.xml");
    }
  }
}
